<template>
  <view class="name">
    <img :src="detail.pic" alt="">
    <view>{{detail.title}} </view>
  </view>
</template>

<script>
import { getCurrentInstance } from "@tarojs/taro";
import axios from "axios";
export default {
  data() {
    return {
      detail:[]
    }
  },
  created() {
    var id = getCurrentInstance().router.params.id;
    console.log(id);
    axios.get(`http://47.108.197.28:4000/api/movieDetail?id=${id}`).then(res=>{
      // console.log(res.data.res);
      this.detail = res.data.res[0];
    })
  },
};
</script>
<style>
.name{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
}
</style>
